<?php $this->load->view('header'); ?>
<?php $this->load->view('cuerpo'); ?>

<div class="formulario">
	<form name="Rbuscar" action="<?php echo base_url(); ?>index.php/perfil/actualizaPerfil" method="POST">
		<fieldset>
			<legend>Buscar</legend>
			<table>
				<tr>
					<td><label>Nombre de Usuario:</label></td>
					<td>
						<input type="text" name="txtUsuario" size="50" oninput="busca()" <?php if(isset($id)){ ?>value="<?php echo $id;}?>" pattern='[a-zA-Z0-9_]{0,40}' maxlength="40" required>
					</td>
				</tr>
				<tr>
					<td><label>Nombre/Razón Social:</label></td>
					<td>
						<div id="nombreAsignar">
							<input type="text" name="txtNombre" size="50" disabled>
						</div>
					</td>
				</tr>
			</table>
		</fieldset>		
		<fieldset>			
			<table>
				<tr>
					<td style="vertical-align:middle; text-align:center;width: 45%;">
						<fieldset>
							<legend>Perfil sin Asignar</legend>
							<div  id="sinperfil">
								<select size="6" name="origen[]" id="origen" multiple="multiple">
									<option value="">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									</option>
								</select>
							</div>
						</fieldset>
					</td>
					<td style="vertical-align:middle; text-align:center;" >
						<input type="button" class="pasar izq" name="agregar" value="Pasar »"><br>
						<input type="button" class="quitar der" name="quitar" value="« Quitar"><br>
					</td>
					<td style="vertical-align:middle; text-align:center;width: 45%;">
						<fieldset>
							<legend>Perfil Asignado</legend>
							<div  id="conperfil">
								<select size="6" name="destino[]" id="destino" multiple="multiple" required>
									<option value="">
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									</option>
								</select>
							</div>						
						</fieldset>
					</td>
				</tr>
				<tr>
					<td colspan="3" style="vertical-align:middle; text-align:center;">
						<input type="submit" value="Guardar" name="guardar" onclick="return confirm('¿Está seguro de establecer el perfil?')">
						<input type="reset" value="Cancelar" onclick="return confirm('¿Está seguro de cancelar la operación?')">
					</td>
				</tr>
			</table>
		</fieldset>
	</form>	
</div>

<?php $this->load->view('footer'); ?>